#include"UdpServer.hpp"
#include"Dict.hpp"
#include<memory>


int main()
{
    EnableScerrn();
    uint16_t port=8899;
    //std::string ip="127.0.0.1";
    Dict dict("./dict.txt");
    func_t translate=bind(&Dict::TransLate,&dict,std::placeholders::_1);

    std::unique_ptr<UdpServer> usvr=std::make_unique<UdpServer>(translate,port);//c++14智能指针标准
    usvr->InitServer();
    usvr->Start();
    return 0;
}